﻿namespace DimensionsHelper.Client.WinUi.Contracts.Services;

public interface IFileService
{
    bool Exists(string fileName);

    string Read(string fileName, Encoding encoding);

    T? Read<T>(string fileName);

    T? Read<T>(string fileName, JsonTypeInfo<T> jsonTypeInfo);

    T? Read<T>(string folderPath, string fileName);

    T? Deserialize<T>(string content, JsonTypeInfo<T> jsonTypeInfo);

    void Save(string fileName, string content, Encoding encoding);

    void Save<T>(string fileName, T content);

    void Save<T>(string fileName, JsonTypeInfo<T> jsonTypeInfo, T content);

    void Save<T>(string folderPath, string fileName, T content);

    void Delete(string folderPath, string fileName);
}